#ifndef AECMODELER_INC_UTIL_H
#define AECMODELER_INC_UTIL_H

#include "zglobal.h"

AECMODELER_NAMESPACE_BEGIN


DllImpExp void UeAppendDxfExtension(const wchar_t inFileName[], wchar_t outFileName[]);


DllImpExp double  UeArcToBulge   (const UePoint2d& p1, const UePoint2d& p2, const UePoint2d& pointOnArc, const UePoint2d& center);
DllImpExp void    UeBulgeToCircle(const UePoint2d& p1, const UePoint2d& p2, double bulge, UePoint2d& center, double& radius);

DllImpExp void UeGetAllConnectedEdgesSharingVertex(const UeEdge* oneEdge, UeDarray& allEdges);

DllImpExp bool    UeProfilesOrdered(const Body&, const Body&);

DllImpExp UeEdge*   UeBreakEdge     (Body&, const UePoint3d&);
DllImpExp UeEdge*   UeBreakEdge     (Body&, const UePoint3d& p1, const UePoint3d& p2);

DllImpExp UeVertex* UeFindVertex    (const Body&, const UePoint3d&);
DllImpExp UeEdge*   UeFindEdge      (const Body&, const UePoint3d&, const UePoint3d&);
DllImpExp void    UeFindFace      (const Body&, const UePlane&, UeDarray& facesFound);

DllImpExp void    UePrintFace     (UeFace*  );
DllImpExp void    UePrintEdge     (UeEdge*  );
DllImpExp void    UePrintVertex   (UeVertex*);

DllImpExp void UeExtremeVertices  (const Body&, const UeVector3d& dir, UeVertex*& vMin, UeVertex*& vMax);

AECMODELER_NAMESPACE_END
#endif

